package org.tpc.printtolls.model;

/**
 * 打印请求参数封装类
 */
public class PrintRequest {
    
    /**
     * 打印机名称
     */
    private String printerName;
    
    /**
     * 纸张宽度（毫米）
     */
    private double paperWidth;
    
    /**
     * 纸张高度（毫米）
     */
    private double paperHeight;
    
    /**
     * 打印份数
     */
    private int copies;
    
    /**
     * PDF文件的URL
     */
    private String pdfUrl;
    
    /**
     * 是否双面打印
     */
    private boolean duplex = false;
    
    /**
     * 打印质量 (1-4，1最低，4最高)
     */
    private int quality = 2;
    
    public PrintRequest() {}
    
    public PrintRequest(String printerName, double paperWidth, double paperHeight, int copies, String pdfUrl) {
        this.printerName = printerName;
        this.paperWidth = paperWidth;
        this.paperHeight = paperHeight;
        this.copies = copies;
        this.pdfUrl = pdfUrl;
    }

    // Getters and Setters
    public String getPrinterName() {
        return printerName;
    }

    public void setPrinterName(String printerName) {
        this.printerName = printerName;
    }

    public double getPaperWidth() {
        return paperWidth;
    }

    public void setPaperWidth(double paperWidth) {
        this.paperWidth = paperWidth;
    }

    public double getPaperHeight() {
        return paperHeight;
    }

    public void setPaperHeight(double paperHeight) {
        this.paperHeight = paperHeight;
    }

    public int getCopies() {
        return copies;
    }

    public void setCopies(int copies) {
        this.copies = copies;
    }

    public String getPdfUrl() {
        return pdfUrl;
    }

    public void setPdfUrl(String pdfUrl) {
        this.pdfUrl = pdfUrl;
    }

    public boolean isDuplex() {
        return duplex;
    }

    public void setDuplex(boolean duplex) {
        this.duplex = duplex;
    }

    public int getQuality() {
        return quality;
    }

    public void setQuality(int quality) {
        this.quality = quality;
    }

    @Override
    public String toString() {
        return "PrintRequest{" +
                "printerName='" + printerName + '\'' +
                ", paperWidth=" + paperWidth +
                ", paperHeight=" + paperHeight +
                ", copies=" + copies +
                ", pdfUrl='" + pdfUrl + '\'' +
                ", duplex=" + duplex +
                ", quality=" + quality +
                '}';
    }
} 